<?php
/*
# ------------------------------------------------------------------------
# JA Job Board Package
# ------------------------------------------------------------------------
# Copyright (C) 2004-2010 JoomlArt.com. All Rights Reserved.
# @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
# Author: JoomlArt.com
# Websites: http://www.joomlart.com - http://www.joomlancers.com.
# ------------------------------------------------------------------------
*/
  defined('_JEXEC') or die('Retricted Access');
?>

<script type="text/javascript" language="javascript">
//<![CDATA[
function submitbutton(pressbutton) {
	var form = document.adminForm;

	if (pressbutton == 'cancel') {
		submitform( pressbutton );
		return;
	}
	if ( pressbutton == 'save' || pressbutton == 'apply' ){
		if(form.name.value == '' ){
		    alert('<?php echo JText::_('Location name could not be empty ')?>');
			form.label.focus();
			return;
		}
		submitform( pressbutton );
	}					
	else {
		submitform( pressbutton );
	}
}
//]]>
</script>

<form name="adminForm" action="index.php" method="post">
	<table width="100%">
	<tr>
	
		<td width="80%" valign="top" align="left">
		
		    <div style="width:100%;">
		    <fieldset>
				<legend><?php if($this->item->id) echo JText::_('Edit Location'); else echo JText::_('Add Location');?></legend>
			    <table>
			    	<TR>
			    		<TD style="width:50%">
			    	
							<table class="admintable">
					        	<tr>
					        		<td class="key" width="20%" align="right">
										<?php echo JText::_( 'ID' ); ?>:
									</td>				
									<td width="80%">
										<strong><?php echo $this->item->id; ?></strong>
									</td>
					        	</tr>	
					        
					        	<tr>
					        		<td class="key" width="20%" align="right">
										<?php echo JText::_( 'Name' ); ?>:
									</td>
									
									<td width="80%">
										<input class="inputbox" type="text" name="name" size="50" maxlength="255" value="<?php echo $this->item->name;?>" /> 
									</td>								
					        	</tr>
					        	<tr>
					        		<td class="key" width="20%" align="right">
										<?php echo JText::_( 'Parent Item' ); ?>:
									</td>
									<td width="80%">
										<?php echo  $this->tree;?>
									</td>
					        	</tr>
					        	<tr>
					        		<td class="key" width="20%" align="right">
										<?php echo JText::_( 'Published' ); ?>:
									</td>
									<td width="80%">
										<?php echo $this->published; ?>
									</td>
					        	</tr>
					    	</table> 			
		    			</td>
		    
		   	 		</TR>
    			</table>
    			</fieldset>    
			</div>
		</td>
	</tr>
	</table>
	<input type="hidden" name="id" value="<?php echo $this->item->id; ?>" />
	<input type="hidden" name="cid" value="<?php echo $this->item->id; ?>" />
	<input type="hidden" name="option" value="<?php echo $this->option; ?>" />
	<input type="hidden" name="view" value="jalocation" />
	<input type="hidden" name="task" value="" />
	<?php echo JHTML::_( 'form.token' ); ?>	
 </form>
